package com.chinamobile.iot.command;

/**
 * Created by szl on 2017/5/26.
 */
public class CommandKey {
    private String clientId;
    private String mqttId;
    private Integer MsgId;

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getMqttId() {
        return mqttId;
    }

    public void setMqttId(String mqttId) {
        this.mqttId = mqttId;
    }

    public Integer getMsgId() {
        return MsgId;
    }

    public void setMsgId(Integer msgId) {
        MsgId = msgId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CommandKey key = (CommandKey) o;

        if (!clientId.equals(key.clientId)) return false;
        if (!mqttId.equals(key.mqttId)) return false;
        return MsgId.equals(key.MsgId);
    }

    @Override
    public int hashCode() {
        return mqttId.hashCode();
    }
}
